﻿using MsTestUtilities.Utilities;
using System;

namespace MsTestUtilities.RowTests
{
    public class ActionExpectationWrapper<E> : IExpectation<E>
    {
        IExpectation _actionExpectation;

        public ActionExpectationWrapper(IExpectation actionExpectation)
        {
            _actionExpectation = actionExpectation;
        }

        public AssertionResult IsSatisfiedFor(Func<E> actualGenerator)
        {
            return _actionExpectation.IsSatisfiedFor(() => { actualGenerator(); });
        }
    }
}
